class Solution:
    def isIsomorphic(self, s: str, t: str) -> bool:
        mapper={}
        rmapper={}
        i=0
        while i<len(s):
            if s[i] not in mapper and t[i] not in rmapper:
                mapper[s[i]]=t[i]
                rmapper[t[i]]=s[i]
            elif s[i] in mapper and t[i] in rmapper:
                if mapper[s[i]]!=t[i]:
                    return False
            else:
                return False
            i+=1
        return True

'''
执行用时：
48 ms
, 在所有 Python3 提交中击败了
70.89%
的用户
内存消耗：
15 MB
, 在所有 Python3 提交中击败了
11.86%
的用户
'''
